home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Amiga Amateur Radio User Group / AARUG UK #81 (199x)(Amiga Amateur Radio User Group UK)(PD)[WB][G4DCV].zip / AARUG UK #81 (199x)(Amiga Amateur Radio User Group UK)(PD)[WB][G4DCV].adf / DisView / FTP < prev    next >
Text File  |  1995-05-29  |  15KB  |  411 lines

  1. ===                                                 DISview [518]
  2. ftp
  3. ===
  4.  
  5. _________________________________________________________________
  6. ftp <nodename>
  7. _________________________________________________________________
  8. The command 'ftp' is used to initiate an FTP session with 
  9. <nodename>. When the session is established, you will enter 
  10. converse mode.
  11.  
  12. When in converse mode with an FTP server, you can use the FTP
  13. client sub-commands described below at the ftp> prompt.
  14.  
  15. When the connection between the two machines is opened, you'll
  16. get a banner from the remote machine, followed by a prompt for
  17. your user name and then your password. If you don't have an
  18. account on <nodename>, login with the user name "anonymous"
  19. and give your email address (e.g. ian@dowrmain.demon.co.uk) as 
  20. the password.
  21.  
  22. NB In the special case of the Demon FTP server (ftp.demon.co.uk),
  23. you can use the login name "ftp" if you can't spell "anonymous"!
  24.  
  25. >> Example:  ftp ftp.demon.co.uk
  26.  
  27.  
  28. The ftp client's 'cd, 'get' and 'mget' commands described below
  29. are logged in the NET logfile. All three record the Internet 
  30. address and name of the remote host. 'cd' records the directory 
  31. name changed to. 'get' and 'mget' record the local and remote 
  32. filenames.
  33.  
  34.  
  35. ===============
  36. FTP SUBCOMMANDS
  37. ===============
  38. During converse mode with an FTP server, everything typed on the
  39. console is first examined to see if it is a locally-known
  40. command.  If not, the line is passed intact to the remote server
  41. on the control channel.
  42.  
  43. However, if it is one of the following commands, it is executed
  44. locally.
  45.  
  46. -----------------------------------------------------------------
  47. ftp> ascii
  48. -----------------------------------------------------------------
  49. Set the file transfer mode to ASCII.  This is the same as the
  50. 'type a' command.
  51.  
  52.  
  53.  
  54. -----------------------------------------------------------------
  55. ftp> batch [on|off]                                  Default: off
  56. -----------------------------------------------------------------
  57. Display or set the command batch flag.
  58.  
  59. >> Example:  batch on
  60.  
  61.  
  62.  
  63. -----------------------------------------------------------------
  64. ftp> binary
  65. -----------------------------------------------------------------
  66. Set the file transfer mode to binary, or "image" mode.  This is
  67. the same as the 'type i' command.
  68.  
  69.  
  70.  
  71. -----------------------------------------------------------------
  72. ftp> cd <remote_directory>
  73. -----------------------------------------------------------------
  74. Change the directory on the remote host to <remote_directory>.
  75. The directory specified can be relative to the current directory,
  76. or absolute, with the name beginning at the root (/).
  77.  
  78. >> Example:  cd /pub/ibmpc/DIS
  79.  
  80.  
  81.  
  82. -----------------------------------------------------------------
  83. ftp> close
  84. -----------------------------------------------------------------
  85. Close the current connection. 
  86.  
  87. (You can then open a new connection with another host if 
  88. required, using the 'open' command described below, without 
  89. quitting the current FTP session).
  90.  
  91.  
  92.  
  93. -----------------------------------------------------------------
  94. ftp> dir [<remote_filename>|<remote_dir> [<local_filename>]]
  95. ftp> list [<remote_filename>|<remote_dir> [<local_filename>]]
  96. -----------------------------------------------------------------
  97. Without arguments, 'dir' and 'list' request that a full directory
  98. listing of the remote server's current directory be sent to the 
  99. console. The listing gives the file names, sizes and creation 
  100. dates.
  101.  
  102. If one argument is given, the remote filename or directory are
  103. listed at the console.
  104.  
  105. If two arguments are given, the second argument is taken as the
  106. local file into which the directory listing should be put
  107. (instead of being sent to the console).  
  108.  
  109. >> Example:  dir public
  110.  
  111.  
  112.  
  113. -----------------------------------------------------------------
  114. ftp> get <remote_filename> [<local_filename>]
  115. -----------------------------------------------------------------
  116. Asks the remote server to send <remote_filename>.
  117.  
  118. The second argument, if given, will be the name by which the
  119. transferred file is to be known on the local machine; otherwise 
  120. it will have the same name as on the remote machine. 
  121.  
  122. N.B. <remote_filename> may contain a mixture of upper-case
  123. and lower-case characters. The name you type here must match
  124. exactly.
  125.  
  126. Before using 'get' you must set the correct transfer mode, using
  127. either the 'ascii' or 'binary' command.
  128.  
  129. Caution: make sure you have enough room on your disk before
  130. starting the transfer. NET does not check this.
  131.  
  132. If you want to terminate the transfer before it has been 
  133. completed, escape to the KA9Q Session Manager (F10 by default)
  134. and then give 'abort' command at the "net>" prompt.
  135.  
  136. >> Examples:  get ls-lR.gz
  137.               get StRaNgE.file.name.2  strange.2
  138.  
  139.  
  140. [Test files for checking file transfer rates are available on
  141. ftp.demon.co.uk in /pub/test].
  142.  
  143.  
  144. -----------------------------------------------------------------
  145. ftp> hash
  146. -----------------------------------------------------------------
  147. A synonym for the 'verbose 3' command.
  148.  
  149.  
  150.  
  151. -----------------------------------------------------------------
  152. ftp> ls   [<remote_filename> | <remote_dir> [<local_ filename>]]
  153. ftp> nlst [<remote_filename> | <remote_dir> [<local_ filename>]]
  154. -----------------------------------------------------------------
  155. The 'ls' and 'nlst' commands produce a short listing (i.e. 
  156. filenames only).
  157.  
  158. >> Example:  ls pub
  159.  
  160.  
  161.  
  162. -----------------------------------------------------------------
  163. ftp> mget <remote_filename> [<remote_filename> ...]
  164. -----------------------------------------------------------------
  165. Fetch a collection of files from the server.  File names may
  166. include wild card characters; they will be interpreted and
  167. expanded into a list of files by the remote system using the NLST
  168. command.  The files will have the same name on the local system
  169. that they had on the server -- this means that you can only use
  170. 'mget' where the remote filenames conform to the standard 8.3
  171. filename convention.
  172.  
  173. Before using 'mget' you must set the correct transfer mode, using
  174. the 'ascii' or 'binary' command.
  175.  
  176. Caution: make sure you have enough room on your disk before
  177. starting the transfer. NET does not check this.
  178.  
  179. If you want to terminate the transfer before it has been 
  180. completed, escape to the KA9Q Session Manager (F10 by default)
  181. and then give 'abort' command at the "net>" prompt.
  182.  
  183. >> Example:  mget *.txt
  184.  
  185.  
  186.  
  187. -----------------------------------------------------------------
  188. ftp> mkdir <remote_directory>
  189. -----------------------------------------------------------------
  190. Create a directory on the remote machine.  You must have write
  191. privilege on the remote machine to use this command.
  192.  
  193. >> Example:  mkdir tmp
  194.  
  195.  
  196.  
  197. -----------------------------------------------------------------
  198. ftp> mput <local_filename> [<local_filename> ...]
  199. -----------------------------------------------------------------
  200. Send a collection of files from your machiner to the remote 
  201. server.  File names may include wild card characters; they will 
  202. be expanded locally into a list of files to be sent.  The files 
  203. will have the same name on the server as on the local system.
  204.  
  205. Before using 'mput' you must set the correct transfer mode, using
  206. the 'ascii' or 'binary' command.
  207.  
  208. You must have write privilege on the remote host to use this
  209. command.
  210.  
  211. If you want to terminate the transfer before it has been 
  212. completed, escape to the KA9Q Session Manager (F10 by default)
  213. and then give 'abort' command at the "net>" prompt.
  214.  
  215. >> Example:  mput *.txt
  216.  
  217.  
  218.  
  219. -----------------------------------------------------------------
  220. ftp> open <nodename>
  221. -----------------------------------------------------------------
  222. Open a new connection with <nodename>.
  223.  
  224. >> Example:  open dowrmain.demon.co.uk
  225.  
  226.  
  227.  
  228. -----------------------------------------------------------------
  229. ftp> pager [on|off]
  230. -----------------------------------------------------------------
  231. Display or set screen display flow control.  When set to 'on', a
  232. -More- prompt is displayed after each screenful of output. Hit 
  233. the spacebar to get the next screenful.
  234.  
  235. >> Example:  pager on
  236.  
  237.  
  238.  
  239. -----------------------------------------------------------------
  240. ftp> put <local_filename> [<remote_filename>]
  241. -----------------------------------------------------------------
  242. Send a local file to the server.  The second argument, if given,
  243. will be the name by which the file will be known on the remote 
  244. machine; otherwise it will have the same name as on the local 
  245. machine. 
  246.  
  247. Before using 'put' you must set the correct transfer mode, using
  248. the 'ascii' or 'binary' command.
  249.  
  250. You must have write privilege on the remote host to use this
  251. command.
  252.  
  253. If you want to terminate the transfer before it has been 
  254. completed, escape to the KA9Q Session Manager (F10 by default)
  255. and then give 'abort' command at the "net>" prompt.
  256.  
  257. >> Example:  put myfile.dat
  258.              put myfoo.txt yourfoo.txt
  259.  
  260.  
  261.  
  262. -----------------------------------------------------------------
  263. ftp> quit
  264. -----------------------------------------------------------------
  265. Terminate the FTP session and returns you to the "net>" prompt.
  266.  
  267.  
  268.  
  269. -----------------------------------------------------------------
  270. ftp> rmdir <remote_directory>
  271. -----------------------------------------------------------------
  272. Delete a directory on the remote machine.  You must have delete
  273. privilege on the remote host to use this command.
  274.  
  275. >>  Example:  rmdir tmp
  276.  
  277.  
  278.  
  279. -----------------------------------------------------------------
  280. ftp> source <local_ftp_script_filename>
  281. -----------------------------------------------------------------
  282. Run a script containing a sequence of ftp> commands. Comment
  283. lines in scripts start with #.
  284.  
  285. >> Example:  source getdir.scr
  286.  
  287.  
  288. >> Example of an FTP script:
  289. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  290. # getdir.scr
  291. # Gets long directory listing
  292. open ftp.demon.co.uk
  293. anonymous                             {login name}
  294. ian@dowrmain.demon.co.uk              {password}
  295. cd /pub
  296. hash
  297. binary
  298. get ls-lR.gz
  299. close
  300. quit
  301.  
  302. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  303.  
  304. If you are scripting and a connection fails, _all_ commands meant
  305. for that host are still executed (they really whiz past the 
  306. screen) up to the next correct connection or EOF <sourcefile>. 
  307. This is not a bug. This method allows a script to continue to 
  308. completion even if one or more hosts are unavailable.
  309.  
  310. If using a script to login to a remote host (as in the above
  311. example), you must put the username and password in plain text in
  312. the script file. If the account is not an anonymous account this
  313. may be a security issue.
  314.  
  315.  
  316.  
  317. -----------------------------------------------------------------
  318. ftp> type [a | i | l <bytesize>]                       Default: a
  319. -----------------------------------------------------------------
  320. Tells both the local client and remote server the type of file
  321. that is to be transferred.  The 'type' command sets the local
  322. transfer mode and generates the TYPE command on the control
  323. channel.
  324.  
  325. Type 'a' means ASCII (i.e. a text file).  In ASCII mode, files
  326. are sent as varying length lines of text in ASCII separated by
  327. CR/LF sequences.  The 'type a' command is the same as 'ascii'.
  328.  
  329. Type 'i' means image (i.e. binary).  In image mode, files are
  330. sent exactly as they appear in the file system.  The 'type i'
  331. command is the same as 'binary'.
  332.  
  333. Type 'l' (logical byte size) is used when exchanging binary files
  334. with remote servers having oddball word sizes (eg. DECSYSTEM-10s
  335. and 20s).  Locally it works exactly like image, except that it
  336. notifies the remote system how large the byte size is.  The
  337. parameter <bytesize> is typically 8.
  338.  
  339. ASCII mode should be used whenever transferring text between
  340. dissimilar systems (eg. UNIX and DOS) because of their different
  341. end-of-line and/or end-of-file conventions.  When exchanging text
  342. files between machines of the same type, either mode will work
  343. but image mode is usually faster.
  344.  
  345. Naturally, when exchanging raw binary files (executables,
  346. compressed archives, etc) image mode must be used.
  347.  
  348. See also the 'ftpopt' command.
  349.  
  350. >> Example:  type a
  351.  
  352.  
  353.  
  354. -----------------------------------------------------------------
  355. ftp> verbose [0 | 1 | 2 | 3]                           Default: 2
  356. -----------------------------------------------------------------
  357. Set or display the level of message output in file transfers.
  358. Verbose 0 gives the least output, and verbose 3 the most, as
  359. follows:
  360.  
  361. 0:  Display error messages only.
  362.  
  363. 1:  Display error messages plus a one-line summary after each
  364.     transfer giving the name of the file, its size, and the
  365.     transfer time and rate.
  366.  
  367. 2:  Display error and summary messages plus the progress messages
  368.     generated by the remote FTP server.
  369.  
  370. 3:  Display all messages. In addition, a "hash mark" (#) is
  371.     displayed for every 1,024 bytes sent or received.  
  372.     'verbose 3' is equivalent to 'hash'
  373.  
  374. If a command is sent to the remote server because it is not
  375. recognized locally, the response is always displayed, regardless
  376. of the setting of 'verbose'.  This is necessary for commands like
  377. 'pwd' (display working directory), which would otherwise produce
  378. no message at all if 'verbose' were set to 0 or 1.
  379.  
  380. >> Example:  verbose 0
  381.  
  382.  
  383. -----------------------------------------------------------------
  384. ftp> view <remote_file>
  385. -----------------------------------------------------------------
  386. Get a remote (text) file and display it on the console, without
  387. saving it locally. This is useful for quick inspection of text
  388. files which describe the contents of compressed archives, for
  389. example.
  390.  
  391. >> Example:  view disview.txt
  392.  
  393.  
  394.  
  395.  
  396. =====================
  397. FILE UPLOADS TO DEMON
  398. =====================
  399. When uploading files to Demon for general distribution, connect
  400. to ftp.demon.co.uk and change to the /incoming directory. Upload
  401. the files into this directory, using 'put'. Remember to set the
  402. mode to binary if uploading binary files (e.g. ZIP files).
  403.  
  404. N.B. The /incoming directory is write-only -- you cannot read the
  405.      directory to verify successful upload. This is a security
  406.      precaution.
  407.  
  408. Also send an email message to "uploads@demon.net", to alert 
  409. Demon to the existence of the uploaded files, and to suggest
  410. where the files should be moved to.
  411.